package net.jqsoft.common.lang;

public class FileTools {
	
	// 路径分隔符
	public static final String FILE_SEPARATOR = System.getProperty("file.separator");

	public static String getFileName(String fileFullName) {
		int dotIndex = fileFullName.lastIndexOf('.');
		return (dotIndex == -1) ? fileFullName : fileFullName.substring(0, dotIndex);
	}
	
	public static String getFileExtension(String fileFullName) {
	    int dotIndex = fileFullName.lastIndexOf('.');
	    return (dotIndex == -1) ? "" : fileFullName.substring(dotIndex + 1);
	}
	
}